//
//  SnowTableViewCell.m
//  BeautyClother
//
//  Created by dllo on 15/9/8.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "SnowTableViewCell.h"

@interface SnowTableViewCell ()

@property (nonatomic, assign) CGFloat offWidth;
@property (nonatomic, assign) CGFloat offHeight;


@end

@implementation SnowTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.offWidth = [[UIScreen mainScreen]bounds].size.width / 375;
        self.offHeight = [[UIScreen mainScreen]bounds].size.height / 667;
        
        self.image = [[UIImageView alloc]init];
        [self.contentView addSubview:self.image];
        [_image release];
        
        self.title = [[UILabel alloc]init];
        [self.contentView addSubview:self.title];
        [self.title release];
        
        self.subTitle = [[ UILabel alloc]init];
        [self.contentView addSubview:self.subTitle];
        [_subTitle release];
        
                
        
        self.layer.cornerRadius = 2;
        self.layer.masksToBounds = YES;
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    
    self.image.frame = CGRectMake(5 *_offHeight, 0, self.frame.size.width - 10 * _offWidth, 150 *_offHeight);
    
    
    
    self.title.frame = CGRectMake(10 *_offWidth, 150 *_offHeight, self.frame.size.width - 10 *_offWidth, 30 *_offHeight);
    self.title.textColor = [UIColor darkGrayColor];
    
    
    self.subTitle.frame = CGRectMake(10 *_offWidth, 180 * _offHeight, self.frame.size.width - 10 *_offWidth, 30 *_offHeight);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
